﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ugrow_silverlight
{
	public partial class Register_payment : UserControl
	{
		public Register_payment()
		{
			// Required to initialize variables
			InitializeComponent();
		}

        private void l_continue_MouseEnter(object sender, MouseEventArgs e)
        {
            Cursor = Cursors.Hand;
            l_continue.Foreground = new SolidColorBrush(Colors.Orange);
        }

        private void l_continue_MouseLeave(object sender, MouseEventArgs e)
        {
            Cursor = Cursors.Arrow;
            l_continue.Foreground = new SolidColorBrush(Colors.Black);
        }

        private void l_cancel_MouseEnter(object sender, MouseEventArgs e)
        {
            Cursor = Cursors.Hand;
            l_cancel.Foreground = new SolidColorBrush(Colors.Orange);
        }

        private void l_cancel_MouseLeave(object sender, MouseEventArgs e)
        {
            Cursor = Cursors.Arrow;
            l_cancel.Foreground = new SolidColorBrush(Colors.Black);
        }

        private void l_back_MouseEnter(object sender, MouseEventArgs e)
        {
            Cursor = Cursors.Hand;
            l_back.Foreground = new SolidColorBrush(Colors.Orange);
        }

        private void l_back_MouseLeave(object sender, MouseEventArgs e)
        {
            Cursor = Cursors.Arrow;
            l_back.Foreground = new SolidColorBrush(Colors.Black);
        }

        private void l_back_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            this.tb_cardnum.Text = "";
            this.tb_securitycode.Text = "";
            this.cb_mastercard.IsChecked = false;
            this.cb_mbnet.IsChecked = false;
            this.cb_visa.IsChecked = false;
            this.Visibility = System.Windows.Visibility.Collapsed;
        }

        private void l_cancel_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            this.tb_cardnum.Text = "";
            this.tb_securitycode.Text = "";
            this.cb_mastercard.IsChecked = false;
            this.cb_mbnet.IsChecked = false;
            this.cb_visa.IsChecked = false;
            this.Visibility = System.Windows.Visibility.Collapsed;
        }

        private void l_continue_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            this.register_userdata1.Visibility = System.Windows.Visibility.Visible;
            this.register_userdata1.CloseNexts();
        }

        public void CloseNexts()
        {
            this.register_userdata1.Visibility = System.Windows.Visibility.Collapsed;
            this.register_userdata1.register_thanksubs1.Visibility = System.Windows.Visibility.Collapsed;
        }
    }
}